home *** CD-ROM | disk | FTP | other *** search
/ Light ROM 3 / Light ROM 3 - Disc 2.iso / programs / amiga / macromkr / macromkr.txt < prev    next >
Text File  |  1995-03-23  |  15KB  |  434 lines

  1. MacroMaker version 2.0
  2.  
  3. Introduction
  4.  
  5.    With the addition of Arexx to the Amiga's operating system, a
  6. very powerful macro language is now at the disposal of the Amiga
  7. user. Unfortunately one of the drawbacks of this, is the fact that
  8. in order to make use of it you must take the time to learn Arexx.
  9. This task is confounded by the fact that each new software product
  10. that implements Arexx support adds a list of new commands to the
  11. language.
  12.     For the graphic artist, animator, desk top publisher one of the
  13. most important program with arexx support is "Art Department Professional".
  14. The arexx support in "ADPRO" gives you the ability to automate your
  15. graphic processing. To make this task easier I created MacroMaker 2.0!
  16.     While this manuel will take you through the workings of MacroMaker
  17. it is in no way going to replace you ADPRO MANUEL! I strongly recommend
  18. you familiarize yourself with both the ADPRO AND AREXX manuals.
  19.  
  20.  
  21. Lets get Started:
  22.  
  23.     When you first load MacroMaker you are greeted by the opening screen.
  24. From here just click the left mouse button to enter the Macromaker program.
  25.  
  26.     On the left hand side of the MacroMaker Main screen you will see a
  27. column of buttons. These buttons bring up the options you can use to create
  28. your arexx scripts. These options will appear in the window on the right
  29. hand side of the screen in the form of a list. To choose the option just
  30. double click you left mouse button on the option of your choice from that
  31. list. If a window appears and there is a button with the name of that
  32. parameter that button MUST be toggled on in order for that parameter
  33. settings to be inserted into your script. If just the name appears than
  34. that parameter will automatically will be set to the setting shown,
  35. choosing the close gadget will cancel the operation.
  36.  
  37.  
  38. The Arexx scripts that are created all will have a break on Control C. In
  39. other words if you wish to stop the script at any time all you have to do
  40. is press the control key and the C key at the same time. This will interupt
  41. the script and cease all activity.
  42.  
  43.  
  44.  
  45. RENDER OPS
  46.  
  47.  
  48. Balance
  49.  
  50.    This brings up a window that allows you to choose the Red, Green, Blue
  51. settings as well as the Contrast, Brightness and Gamma Settings. When you
  52. are satisfied with your choices click you left mouse button on OKAY.
  53.  
  54. Dither
  55.  
  56.     This Brings up a window that allows you to choose the dither options
  57. allowed in Adpro.
  58.  
  59. Palette
  60.  
  61.     This Brings up a window that allows you to choose the palette options
  62. allowed in Adpro. (Refer to your ADPRO Manuel For Info On Palette Options)
  63.  
  64. Palette_Load
  65.  
  66.     This Brings up a requester that allows you to choose a palette to load
  67. into Adpro.
  68.  
  69. Palette_Save
  70.  
  71.     This Brings up a requester that allows you to save a palette from Adpro.
  72.  
  73. Render_Type
  74.  
  75.     This Brings up a window that allows you to choose how Adpro will render
  76. that image. ie Ham, 16color, Extra Half Bright, etc.
  77.  
  78. Screen
  79.  
  80.     This Brings up a window that allows you to choose the screen type Adpro
  81. will use to render the image. ie. Hi-Res, Interlace, Overscan, etc
  82.  
  83. WB_Palette
  84.  
  85.     This tells Adpro to use the Work Bench Palette.
  86.  
  87. Load_As_Portrait
  88.  
  89.     This tells Adpro to load the Image as a portrait
  90.  
  91. Load_as_landscape
  92.  
  93.     This tells Adpro to load the image as a landscape
  94.  
  95.  
  96. GET INFO
  97.  
  98.     Here is one of the more interesting features of MacroMaker. Arexx and
  99. Adpro allows you to as information about an image or settings and place
  100. that information in a variable. You can then use the Variable to create
  101. conditional statements. These Statements will be covered later in the
  102. "IF/Then/Else" Section. Each time you create a variable it will appear in
  103. the "IF THEN ELSE" window along with the value it represents. This is to be
  104. used later in your statements. There are two exposition to this.
  105.  
  106. OKAY1
  107.  
  108.     IF you want to inform the user of your arexx script that something went
  109. wrong, you can use the OKAY1 requester. When you double click on OKAY1 a
  110. requester asks you for a message. This message will be displayed when an
  111. error in the preceding command occurs. For example lets say you go to load
  112. a picture and Adpro for some reason cannot load that file. You can have the
  113. requester inform you that this condition has happened. Once you have been
  114. informed and acknowlege the requester the arexx script will exit.
  115.  
  116. OKAY2
  117.  
  118.     The OKAY2 requester in Adpro, will allow your script user to choose an
  119. action to take. Here again a requester comes up that allows you to enter
  120. The message you want to display. The script line is typed into the
  121. MacroMaker Edit screen in the lower half. You must then choose the actions
  122. you want to take if the answer is yes, use the Else button and then choose
  123. the action to take if the answer is NO. THIS MUST BE FOLLOWED BY THE WORD
  124. "END"!
  125.  
  126. USER DEFINED
  127.  
  128.     This will allow you to create your own Variables and assign a value to
  129. them. You will have a choice of Text, Numeric or conditional.
  130.  
  131.     A more detailed Description of the If then Else statements are covered
  132. in your Arexx manual.
  133.  
  134.  
  135. Loaders
  136.  
  137.  
  138.     Here you choose which load format you wish Adpro to use when loading an
  139. Image
  140.  
  141. Backdrop
  142.  
  143.     This loader brings up a window that allows you to choose the file size
  144. of the image as well as whether it is color or Grey scale. The four boxes
  145. in the center of the window allow you to set the color of the four
  146. quadrants that Adpro will use to gradiate between.
  147.  
  148. Backline
  149.  
  150.     This Loader Brings Up A window That allows you to choose the file size
  151. of the image as well as whether it is color or grey scale. The three boxes
  152. in the center of the window allow you to set the color of the three quadrants
  153. that ADpro will use to gradiate between. Position is the position of the
  154. Middle Color in respect to the start and end colors. Direction is the 
  155. Direction of the Color gradiatant.
  156.  
  157.  
  158. Framegrabber
  159.  
  160.     This loader controls the Framegrabber's digitizing capabilities. A
  161. window appears allowing to choose how the Framegrabber will digitize the
  162. image.
  163.  
  164. IV24
  165.  
  166.     This Loader brings up a window that allows you to choose where in the
  167. IV24 buffer the image will appear and how much of the image will be loaded
  168. in.
  169.  
  170.  
  171.  
  172. Savers
  173.  
  174.     This sets the Save format Adpro will use to save your image. In the
  175. case of the Display boards (FC24, A2410, IV24, Etc), You will be given
  176. options that will control that particular board. You MUST Toggle the button
  177. with the Option Name on it to the ON position for that Option to be
  178. inserted in your script.
  179.  
  180.     For the other Savers you are presented with a window that will allow
  181. you to choose the type of image to save. For Example in the IFF saver you
  182. have the option to save a file as RAW(24bit IFF), Image (Render IFF) or
  183. Screen. The Impluse saver will allow you to save as RGBN (12Bit) or RGB8
  184. (24 Bit).
  185.  
  186.  
  187. Operators
  188.  
  189.     Here is where you choose what to do to your image once it is loaded
  190. into Adpro. When you double click on the operator of choice you are either
  191. given a Window or series of windows asking you for the parameters you wish
  192. to attach to that operator. Again if there is a toggle button for a
  193. parameter, that button MUST be toggled ON for it to take effect.
  194.  
  195.     Please refer to your ADPRO manual for specific information about the
  196. operators and their parameters.
  197.  
  198. Colorize Operator
  199.  
  200.    The Colorize operator follows the syntax of in the adpro manual. The
  201. "OTHER GRAY" is equal to the "F" varable. If you do not select the 
  202. "OTHER GRAY" button than the "F" Varable will be assigned -1(pass thru)
  203.  
  204.  
  205.  
  206.  
  207. Routines
  208.  
  209.  
  210. Load_File
  211.  
  212.     This or course will create the routine to load a file into Adpro. This
  213. is done with Error Checking.
  214.  
  215. Save_File
  216.  
  217.     This will create the routine to Save a file from Adpro
  218.  
  219. Batch_Load_Save
  220.  
  221.     Here is a very useful feature of MacroMaker! This will create the
  222. routine that will allow you to load a directory of files into Adpro and
  223. save them out to a different directory. When you use this option you are
  224. presented with a Requester asking you for a name to give the operator call.
  225. You Must enter a name into the request with NO SPACES! This is used by the
  226. routine to call the operators to use on each image loaded. You will be
  227. brought to a Operator call screen (very similar to the main screen, but
  228. with some options not available) where you will choose the actions to take
  229. on each of the loaded images.
  230.  
  231.  
  232. File_Under_Batch
  233.  
  234.     This routine will allow you to place a chosen picture under a directory
  235. of files. First a window will appear to name the operator call, next you
  236. are asked for the Left/top, Mix, transparent color of the composted file.
  237. *See Batch_Load_Save*
  238.  
  239. File_Over_Batch
  240.  
  241.     This routine will allow you to place a chosen picture under a directory
  242. of files. First a window will appear to name the operator call, next you
  243. are asked for the Left/top, Mix, transparent color of the composted file.
  244. *See Batch_Load_Save*
  245.  
  246.  
  247. Render_From_File
  248.  
  249.     This is a special routine that will load an image in and determine from
  250. the file's width and height what the Image should be render at. For example
  251. if the image is 736x482 it will render the image as Hi-Res, Overscan 16
  252. Colors. If it is 320x400 it will render an image as low-Res, Interlace,
  253. Non-Overscan, Ham. Etc
  254.  
  255. Compost_New_file
  256.  
  257.     This Routine will give you the ability to "compost" a new file on top
  258. of the loaded image. You will be given a series of windows that will let
  259. you choose the Left/Top, Transparent Color, Mix that will be used to
  260. compost the image on top of the loaded image.
  261.  
  262. Dos_Command
  263.  
  264.     This routine will allow you to enter a DOs Command. Here you can run a
  265. separate program from you arexx script. For example let say you are
  266. creating a script that will take a directory of 24bit images and jpeging
  267. them to save on harddrive space. You can use the dos command to delete the
  268. file once it has been saved as a jpeg file.
  269.  
  270.  
  271. MAKEANIM
  272.       
  273.     This routine allows you to batch process a series of selected frames
  274. using the Getfiles command in adpro. A list is then created in ram: called
  275. filelist which is then used by the public domain utility "MakeAnim".
  276.  
  277. *NOTE: You must have Makeanim in your c: directory for this routine to 
  278. work in Arexx.
  279.  
  280.  
  281.  
  282.  
  283. FUNCTIONS
  284.  
  285.     Here is where you can use the user created functions! if you have certain
  286. operations that you will use in your scripts over and over you can create
  287. your own function calls and use them in your scripts. Just double click on the
  288. function you wish to use and it will be inserted in your script.
  289.  
  290.  
  291.  
  292. MAKE FUNC CALL
  293.  
  294.     When you click on this button You will enter the Function Call Screen.
  295. This screen is the same as all the other screens with the exception of the
  296. ability to do batch file operations. Here you will create actions that you
  297. feel you can use over and over again. You will find I have included two calls
  298. for your to see. DCTV4bitos.rexx (creates DCTV pic 4 bitplanes overscan) and
  299. DCTV3Bitos.rexx(creates DCTV pic 3 Bitplanes Overscan)
  300.  
  301.  
  302.  
  303.  
  304. Exit ADPRO
  305.  
  306.     This button inserts the command that will quit ADPRO and remove it from
  307. memory. No other Arexx commands will be Executed after this command.
  308.  
  309.  
  310.  
  311. Execute
  312.  
  313.     This button inserts the command that will Render the image to the
  314. Render settings set. This command is automatically set in your script but
  315. you may want to use it before the end of a operator call so here it is.
  316.  
  317.  
  318. PAUSE
  319.  
  320.     This will allow you to place a pause in your script in Ticks
  321.       *See your adpro manual for more info on pause*
  322.  
  323.  
  324.  
  325. MAKE SCRIPT
  326.  
  327.     This button takes you to The MacroMaker Save screen. Here you can
  328. assign you Macro a ADPRO Name. First you choose the Key (ie Shift Key,
  329. Amiga Key, Etc) then the Function Key you wish to assign this script to.
  330. Then just hit the save button. The script is saved to your REXX assigned
  331. directory ready for your use.
  332.  
  333. The Nameing of Arexx scripts are covered in your Adpro Manual.
  334.  
  335.  
  336.  
  337. Comment Field
  338.  
  339.     Here you can add your own comments to your scripts. Just type what you
  340. want to appear as a comment and hit return. The comment will be inserted
  341. into your script. Comments can make reading your scripts easier later on if
  342. you forget what they were made to do.
  343.  
  344.  
  345.  
  346. IF THEN ELSE
  347.  
  348.     Here is where you can create conditional statements so you script can
  349. decide on what to do based on parameters you set up. The IF THEN ELSE
  350. window contains the variables you create with the Get Info commands as well
  351. as RC (Arexx Error Codes) and Adpro_result (Adpro's return results). By
  352. double clicking on the variable you want to use you are presented with a
  353. window that allows you to choose the relation to the variable (ie Equal,
  354. Greater Than, Etc) and the test value in either Numbers, Text or
  355. True/False. Once you have the "IF" statement, you would then determine the
  356. action Adpro will take if the statement is determined to be true. After
  357. which the you must follow the Action with Either an END, ELSE IF, ELSE DO
  358. statement.
  359.  
  360. Else if
  361.  
  362.     This command lets you test more than one condition. Place the cursor
  363. over the variable in the "IF THEN ELSE" window and click on the "ELSE IF"
  364. button. This will bring up the Relational window as it did when you double
  365. clicked on the variable. The difference is "ELSE IF" will be inserted
  366. before the condition instead of just "IF". If the "IF" statement is proved
  367. to be false the script will then check for the next condition with the ELSE
  368. IF statement and execute everything afterward if that statement proves to
  369. be true.
  370.  
  371. Else DO
  372.  
  373.     If the "IF" condition Proves to be FALSE, The Else Do command will
  374. execute it's commands.
  375.  
  376. EXIT
  377.  
  378.     EXIT will stop the arexx script from executing. No other commands will
  379. be sent after this command.
  380.  
  381. END IF
  382.  
  383.     This command ends the IF statement and continues on with the rest of
  384. the script. If the statements proves to be false arexx will skip over
  385. everything between the If/ELSE IF and End Commands and execute everything
  386. afterwards.
  387.  
  388.  
  389. USE
  390.  
  391.     This will just insert the variable name. This is just in case you wish
  392. replace a parameter of a command with the variable.
  393.  
  394.  
  395.  
  396.  
  397. Example
  398.  
  399.  
  400. If Var <= 736 THEN DO
  401.  
  402. ABS_SCALE 640 400
  403.  
  404. ELSE IF VAR >= 736 THEN DO
  405.  
  406. ABS_SCALE 320 400
  407.  
  408. ELSE DO
  409.  
  410. EXIT
  411.  
  412. END
  413.  
  414.  
  415.     The above script test to see if the variable VAR is "Less Than or Equal
  416. To" 736. If it is it scales the image to 640 x 400. If that statement if
  417. false it then checks to see if the VAR is "Greater Than or Equal to" 736.
  418. If this statement is true it then scales the image to 320x400. If neither
  419. statement proves to be true the Arexx script stops with the Exit Command.
  420.  
  421.     Notice that the conditional statement ends the END Command. This is
  422. very important. YOU MUST END EACH CONDITIONAL STATEMENT WITH AN "END"!
  423.  
  424.     Please refer to your Arexx manual for more information about
  425. conditional statements.
  426.  
  427.  
  428.     I hope this program becomes useful to you in creating your own arexx
  429. scripts. I wrote this in such a way that it will be easy to upgrade as more
  430. features are added to ADPRO.
  431.  
  432.  
  433.  
  434.